COMX Version 4.2 Copyright (C) 1990-1991 Samuel A. Sholl 6410 Romford Road Madison, WI 53711 608-277-1661 LICENSE AND REGISTRATION All versions of COMX, from Version 4.21 on, are NOT Public Domain software nor are they Free software. Currently, COMX is a SHAREWARE program and requires the user to register the program if he or she intends to use it except for the purpose of limited evaluation described below. Registration grants the user a license to use COMX on a single computer at any one time. Non-registered users are granted a limited license to use COMX on a trial basis for the purpose of evaluation and determining if COMX is suitable for their needs. Use of COMX, except for this limited purpose, requires the user to register the product. All users of the SHAREWARE version of COMX are granted limited license to copy the product only for the trial use by others, subject to the above limitations, provided that COMX is copied in its full and unmodified form. That is, the copy must include all files necessary to permit full operation of the program, this license agreement, registration form and full documentation. No fee, charge, license, warranty, registration obligation or other compensation of any kind may be accepted by the donor or recipient in exchange for a copy of COMX. Operators of Electronic Bulletin Board Systems (BBS Sysops) may permit the SHAREWARE version of COMX to be downloaded by any user, and any user may be permitted to upload a copy of COMX to a BBS, with the Sysop's permission, provided the above conditions are met. Use of non-registered copies of COMX by any person in connection with a business, corporation, educational establishment or government agency is forbidden. Such users must register the product and/or purchase a site license agreement. Registration of COMX licenses you to use the product on a regular basis and entitles you to receive notification of bug-fixes, enhancements, extensions, upgrades etc. and product technical support relating to the use and application of COMX. Registration covers the use of the product, by the registered user only, and provides you with the latest version of COMX on disk and a complete, more comprehensive printed copy of the user manual. As a registered user, you will be notified of future COMX upgrades and revisions and offered the opportunity to acquire them at a preferred rate and also, for a limited time, you will be provided with minor upgrades, bug-fixes etc. free of charge. Shareware is copyrighted by its author and cannot be distributed without the author's permission. The author retains all rights (unlike Public Domain software) to a shareware program and can make changes to it, or withdraw it from public use as he or she wishes. The distribution of shareware is encouraged by the author so that others may evaluate it and determine if it meets their needs, use of which beyond a reasonable evaluation period requires the user to register his or her copy of the program. September 14, 1991 Samuel A. Sholl 6410 Romford Rd. Madison, WI 53711 CONTENTS Page 1. OVERVIEW AND HISTORY OF DEVELOPMENT . . . . . . . . . . . 1 2. INFORMATION ON THE NOTATION IN THIS DOCUMENT AND ON COMX MENU AND KEYBOARD USAGE . . . . . . . . . . . . . . . . 2 3. INSTALLING COMX . . . . . . . . . . . . . . . . . . . . . 4 3.1 COMX Files on The Installation Disk . . . . . . . . 4 3.2 Hardware and MSDOS Requirements . . . . . . . . . . 4 3.3 Copying Files to Your Computer . . . . . . . . . . . 5 3.4 Starting COMX and Finishing The Installation . . . . 5 4. EXITING COMX ([M:Alt-X]) . . . . . . . . . . . . . . . . . 7 5. HELP ([M:F10]) . . . . . . . . . . . . . . . . . . . . . . 7 6. STARTUP OPTIONS . . . . . . . . . . . . . . . . . . . . . 7 7. TERMINAL EMULATION ([M:Alt-T]) . . . . . . . . . . . . . 10 7.1 General Information . . . . . . . . . . . . . . . 10 7.2 Function Keys . . . . . . . . . . . . . . . . . . 11 7.3 Specific Information on Options in [M:Alt-T] . . . 11 8. DIALING INTO ANOTHER COMPUTER . . . . . . . . . . . . . 13 8.1 Dialing From Terminal-Mode . . . . . . . . . . . . 13 8.2 Dialing From the Autodial Directory ([M:Alt-D]) . 14 8.2.1 Adding an Entry ([M:Alt-D,A]) . . . . . . . 14 8.2.2 Changing/Modifying an Entry ([M:Alt-D,C]) . 14 8.2.3 Dialing an Entry ([M:Alt-D,D] or Entry#) . 15 8.2.4 Sorting Entries ([M:Alt-D,S]) . . . . . . . 15 8.2.5 Technical Notes . . . . . . . . . . . . . . 15 9. SENDING AND RECEIVING FILES ([M:PgUp] and [M:PgDn]) . . 15 9.1 General Information . . . . . . . . . . . . . . . 15 9.2 Sending a File to Another Computer ([M:PgUp], `Uploading') . . . . . . . . . . . . . . . . . . 16 9.2.1 Basics . . . . . . . . . . . . . . . . . . 16 9.2.2 Aborting the Transfer . . . . . . . . . . . 16 9.2.3 Technical Notes . . . . . . . . . . . . . . 17 9.3 Receiving a File from Another Computer ([M:PgDn], `Downloading') . . . . . . . . . . . . . . . . . 18 9.3.1 Basics . . . . . . . . . . . . . . . . . . 18 9.3.2 Technical Notes . . . . . . . . . . . . . . 18 10. KEY-MACROS ([M:F1]) . . . . . . . . . . . . . . . . . . 18 10.1 General Information . . . . . . . . . . . . . . . 18 10.2 Invoking a Key-Macro . . . . . . . . . . . . . . 19 10.3 Special Key-Macro Characters . . . . . . . . . . 19 11. SAVING OPTION CHANGES TO COMX ([M:F3]) . . . . . . . . 20 12. RUNNING A SCRIPT FROM WITHIN COMX ([M:F4]) . . . . . . 20 13. SENDING TERMINAL-MODE CHARACTERS TO THE PRINTER i ([M:F5]) . . . . . . . . . . . . . . . . . . . . . . . 20 14. SAVING TERMINAL-MODE CHARACTERS IN A FILE ([M:F6]) . . 20 15. DOS ACCESS ([M:F7]) . . . . . . . . . . . . . . . . . . 21 16. ABORTING A FILE TRANSFER PROGRAM ON ANOTHER COMPUTER ([M:Alt-A]) . . . . . . . . . . . . . . . . . . . . . 21 17. CHANGING SERIAL (COM) PORTS ([M:Alt-C] or [M:F2,A]) . . 21 18. CHANGING PRINTER (LPT) PORTS ([M:F2,B]) . . . . . . . . 21 19. INVOKING A WORD PROCESSOR OR EDITOR FROM WITHIN COMX ([M:Alt-E]) . . . . . . . . . . . . . . . . . . . . . 21 20. HANGING UP THE PHONE ([M:Alt-H]) . . . . . . . . . . . 21 21. LOGGING FILE TRANSFERS ([M:Alt-L]) . . . . . . . . . . 22 22. TURNING THE MAIN MENU OFF AND ON ([M:Alt-M]) . . . . . 22 23. PRINTING A FILE DURING ITS DOWNLOAD ([M:Alt-P]) . . . . 22 24. DISPLAYING A FILE DURING ITS DOWNLOAD ([M:Alt-S]) . . . 22 25. REDIALING A PHONE NUMBER ([M:Alt-R]) . . . . . . . . . 22 26. LISTING THE FILES IN A DIRECTORY ([M:F2,M]) . . . . . . 22 27. VIEWING A TEXT FILE ([M:F2,N]) . . . . . . . . . . . . 23 28. HOST-MODE ([M:F2,L]) . . . . . . . . . . . . . . . . . 23 29. USING COMX UNDER DESQview (V. 2.2/2.3) AND WINDOWS 3.0 24 30. CREATING A 132 COLUMN DISPLAY / MULTI-COM PORT DRIVER . 25 31. SCRIPT FILES . . . . . . . . . . . . . . . . . . . . . 27 31.1 General Information . . . . . . . . . . . . . . . 27 31.2 $Variables . . . . . . . . . . . . . . . . . . . 28 31.3 Jump Labels . . . . . . . . . . . . . . . . . . . 29 31.4 Toggling Activity . . . . . . . . . . . . . . . . 29 31.5 Error Return Values from Commands (ERRVAL) . . . 29 31.6 Basic Commands . . . . . . . . . . . . . . . . . 30 31.7 Stack Commands (.op __) . . . . . . . . . . . . . 35 31.7.1 General Information . . . . . . . . . . . 35 31.7.2 Math Operations on Stack Values . . . . . 36 31.7.3 Moving Values To, From and On Stack . . . 37 31.7.4 Comparison of Stack Values . . . . . . . . 37 31.8 Jump Commands (.op j_) . . . . . . . . . . . . . 37 32. TIPS AND TRICKS . . . . . . . . . . . . . . . . . . . . 38 33. ASCII CHARACTER SET AND ANSI.SYS ATTRIBUTE ii ESC SEQUENCES . . . . . . . . . . . . . . . . . . . . 40 34. COMX SCRIPT FILE TRACER AND DEBUGGER (CXTRACE.EXE) . . 41 35. FILE COMPRESSION AND DECOMPRESSION (CXCOMP.EXE) . . . . 42 36. ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . 43 37. LIABILITY . . . . . . . . . . . . . . . . . . . . . . . 43 38. TECHNICAL SUPPORT . . . . . . . . . . . . . . . . . . . 43 39. INDEX . . . . . . . . . . . . . . . . . . . . . . . . . 44 iii 1. OVERVIEW AND HISTORY OF DEVELOPMENT COMX was originally developed to provide users of PC's easy access to UNIX mainframes. From the start, I also wanted to design a program that could be ported easily to different hardware configurations. With this in mind, COMX was written in `C', `lex' and assembly. Direct video access was kept to a minimum. COMX has undergone extensive testing and the resulting program is before you now. COMX offers terminal emulation, file transfer capabilities, a `host-mode' and an extensive script language. COMX can run under a windowing environment such as DESQview and Windows 3.0. The script language which is provided is a low level, prefix notation language. A compiler is presently being developed to support higher level commands. Benefits to using COMX: Requires Only 130K of Memory Terminal Emulation - Ten types are supported including printer control File Transfers - Nine transfer protocols are supported 132 Column Display Extensive Script File Language - Supports merged scripts and flow control Command Line Script File Execution, Including Arguments Key-Macros Host-Mode Access Up To 15 COM Ports - At once or individually Operates Under DESQview and Windows 3.0 Operates with CGA/EGA/VGA/Hercules Video Boards Operates on Generic MSDOS Computers Operates on 8086-80486 Computers Network Compatible Utility Programs: Script Tracer, File Compressor, Etc. SPEED 1 2. INFORMATION ON THE NOTATION IN THIS DOCUMENT AND ON COMX MENU AND KEYBOARD USAGE My comments are enclosed in `{}'. Means: Press the Escape key. This will get you out of most predicaments. Means: Press the Enter/Return key. e.g., Means: Press the Cntrl-key & `U'-key together. [Alt-A] e.g., Means: Press the Alt-key and `A'-key simultaneously. [F2] e.g., Means: Press the F2-function key. Menu options are frequently designated by the key strokes needed to execute them. For example, [F2,A] means: Press the F2-function key followed by the `A'-key. The following type of notation is also used: [M:F2,O,B]. In this case, the preceding `M:' means that the following key strokes can be executed from the main startup menu or terminal-mode. [...] Means: Optional argument in []. <...> Means: Required argument in <>. LF Means: linefeed (ascii 10); CR Means: carriage return (ascii 13). EOL Means: Text file end-of-line designation (normally CR/LF). Editing Input: When you are asked for more than one character of input information, the following keys may be used to edit your input as it is entered: Erase the entire line. Erase from the cursor to the end of the line. Move cursor to the start of the line. Move cursor to the end of the line. Move cursor to the next character. Move cursor to the previous character. Move cursor to the next word. Move cursor to the previous word. Delete character before the cursor. Delete character under the cursor. You can enter only one line of information. 2 A final note: If you use a word processor to prepare a COMX script or key-macro file, make sure that you save the file as a DOS text file. COMX does not understand the control characters that are frequently found in word processor files. 3 3. INSTALLING COMX 3.1 COMX Files on The Installation Disk Main Program (Only One Required) COMX.EXE For 8086-80486 computers. COMXG.EXE For computers with IBM INcompatible serial port hardware. Utility Programs CXTRACE.EXE Script file tracer and debugger. CXCOMP.EXE File compression and decompression program. CXDRIVER.EXE Video and COM port driver creation program. Miscellaneous Files COMXKEY.TXT An example key-macro file. COMXHELP.TXT Text file containing the help information that is sent to a remote computer when COMX is in host-mode and an .he command is received. CXDRIVER.TXT A demo file which can be run through CXDRIVER. COMXPWD0.TXT An example password file for host-mode. Script Files HOSTON.CEX Host-mode activation - Required. HOSTOFF.CEX Host-mode deactivation - Required. INSTALL0.CEX An example of installation-script settings. NETBRK.CEX Broadband network hangup. VT220KEY.CEX VT220 function key mappings. TELEKEY.CEX Televideo 950 function key mappings. SERVER.CEX Example of server commands for a UNIX system. STACK.CEX Demonstration of COMX stack operations. LINK.CEX Set system parameters so that two computers linked by a null modem, and both running COMX, can communicate with one another. LOGIN.CEX A simple automatic login script. MODEM.CEX Sends Hayes commands to a modem to properly initialize it for COMX. UNXHELP.CEX A very simple help-menu script. HANGUP.CEX Sends commands to a modem to hangup the phone. TOOLS.CEX Some useful utilities from a menu. 3.2 Hardware and MSDOS Requirements An MSDOS computer (MSDOS 2.11 or higher) and a Hayes-compatible modem unless attached to a network. If your computer is IBM compatible, use COMX.EXE. If your computer has nonstandard serial port hardware, use COMXG.EXE. (Uses Bios interrupts for serial I/O.) COMX.EXE requires 130K of memory. The MSDOS extended screen driver, `ANSI.SYS', should be installed. Normally, you would do this by including in your 4 `CONFIG.SYS' file the line, "DEVICE=ANSI.SYS". The latter assumes that `ANSI.SYS' is in the root directory of your bootup drive. COMX can sense the kind of video hardware which you are using and configure itself appropriately. The disk from which you are running COMX.EXE should be writable. 3.3 Copying Files to Your Computer Only those files which are marked `Required' above are necessary for the minimal operation of COMX. You should decide on a directory for COMX.EXE. (This should be in your DOS Search PATH.) You should also decide on a directory for your COMX script files. (This need not be in your DOS Search PATH. If you are using `COMX.EXE', you will be asked for the name of this directory the first time you start COMX.) Files labeled `Miscellaneous' above, should reside in the root directory of your bootup drive. Let's assume that the COMX distribution files are located on a floppy disk in Drive A:, and that you wish to locate COMX.EXE (and utility programs) in the root directory of Drive C: and script files in the directory, C:\COMX. From Drive C: you would type the following commands: CD C:\ MKDIR COMX {If the directory doesn't already exist.} COPY A:*.EXE COPY A:*.TXT \ {These files must be in the root directory of your bootup drive.} COPY A:*.CEX COMX 3.4 Starting COMX and Finishing The Installation If your computer is attached to a modem, turn on the modem at this time. For modems with dip switches which control DTR and CD lines, both switches should be set so that the lines are NOT FORCED HIGH at all times. COMX will not work properly unless these dip switches are set correctly. At the DOS prompt type: COMX If your computer has an active modem a series of Hayes commands will be sent to it. These will configure it optimally for COMX. The commands are: AT&D2&C1L1TX1&W These commands will only be sent if a CTS (clear-to-send) signal is detected. The last command, `&W', writes the parameters to the modem's nonvolatile memory. If your modem does not support this command, you may wish to include the following line in the file, `COMXAUTO.CEX': 5 .tr AT&D2&C1L1TX1^M `COMXAUTO.CEX' is a script file which is automatically executed each time you start COMX. It should be located in your COMX script directory. During the installation period, COMX will save information about your system in the files, `COMXN.SET'and `COMXMM.SET', in your root directory. The next time you start COMX this information will be recalled. After the installation period, you will see the main COMX menu. If you press any key, other than one of the function keys listed on the menu, the screen should clear. You are now in the `terminal-mode'. In this mode, any key that you type will be passed on to your modem via the serial port. Let's see if your modem is working properly. Type: AT You should see `OK' displayed on the screen. If you do, all's well and you could play around a little or simply exit COMX ([Alt-X]). If not, something may have confused COMX during the installation, or your modem may not have been turned on. If the latter was the case, exit COMX ([Alt-X]), turn on your modem and start COMX again. However, this time you will have to specifically tell COMX to initialize itself: Type: COMX /I If your modem is on, check to see if the serial port settings are correct. To do so, bring up the main menu ([F10]) and on the status line, you'll see the serial port settings for the current serial (COM) port. You may see something like, `1200E17', which stands for: 1200 - Baud rate. E - Even parity. 1 - 1 Stop bit. 7 - 7 Bit word length. {These are the general default settings for a modem.} Is the baud rate correct for your modem? If not, hit [Alt-U]. The cursor will be on the baud rate value. Use any normal key to bring up successive rate values until the correct one is in the field. At this point you could change the other parameters by using the left or right arrow key to move to the appropriate field and any other key to change the value in that field. To save your new settings, just press . Your new values will appear on the status line. Press [F3] to save this change for the next time you invoke COMX. Now let's try your modem again. Press any non-function key to return to the terminal-mode. Repeat the `AT' - test. Still no response? Do you have more than one serial port? If so, COMX may have gotten confused during the installation. Press [Alt-C]. This will move you to the next higher serial port. Make sure that your serial port settings are correct as described above. (Different settings can be associated 6 with different serial ports.) Make sure you press [F3] to save any changes to these settings. Keep trying to invoke an `AT' response until you've exhausted all of your serial ports. Still no response? Did you remember to set those modem dip switches correctly as I told you above? If not, exit COMX now ([Alt-X]) and set them. Reinitialize COMX as I described earlier. If all else fails, try some of the startup options described below. You can specify your default installation settings in a special script file, `INSTALL.CEX', which should be located in the root directory of your bootup drive or in your script directory if it happens to be: C:\COMX. During the installation of COMX, settings will be taken from this script file. See the sections on script files for more information. At some point you should verify that the information generated during COMX's initialization is correct. Specifically, there are two pieces of information which are critical for the normal operation of COMX. Both are located in the F2-Menu. Press [F2] to get to this menu. If your computer is attached to a modem, the entry under item [H] should be CONNECT. Also, the script file directory indicated under option [C] should coincide with where you copied the COMX script files. Change these two entries if necessary, exit the F2-Menu and save your changes by pressing [F3]. 4. EXITING COMX ([M:Alt-X]) Hit [Alt-X] from the main menu or the terminal-mode screen. This is the only way to do it. 5. HELP ([M:F10]) Hit [F10] from the main menu or the terminal-mode screen. The main menu will be displayed. 6. STARTUP OPTIONS In the following, `-' may be substituted for `/'. Option letters may be in lower case. Summary of Option Usage COMX /Port# /OPort# /VVaddr# /CCOLORS /D /E /H /I /M /P /S [Script File List] [-- $Argument List] /Port# Where Port# = 1 -> maximum number of serial ports. Normally, COMX initializes itself to the COM Port to which an active modem is attached. This option will override that feature, so that on entry, the current port will be the COM Port#. Other ports will still be active. For example: COMX /2 {Enter on COM2} /CCOLORS Set colors for bold, reverse video and 7 underline where: COLORS = A three character string (e.g. /CYWR). The first character of the string is the code for bold; the second character of the string is the code for reverse video; the third character is the code for underline. These codes only apply if you are using a color monitor. On monochrome displays, underlined characters will actually be underlined. Bold Code Y: Yellow characters on a blue background. W: White on blue. R: Red on blue. G: Green on blue (default). Reverse Video Code Y: Yellow on red. B: Black on green. G: Green on black. C: Cyan on black (default). Underline Code Y: Yellow on blue (default). W: White on blue. R: Red on blue. G: Green on blue. /D Set DTR signal OFF (Low) at all times. {RTS is always ON (High)} /E Computer equipment report only. /I Force the initialization of COMX. Appropriate scripts may be run with this to specifically customize various COMX parameter options. /H If your VGA board is emulating a Hercules board and you are not seeing bold characters in the menus, use this option. /M Monochrome display. {Use only if problems are experienced.} /OPort# Open a specific COM Port# and no others. Port# = 1 -> maximum number of serial ports. Normally, all ports are opened and initialized. /P A specific video hardware address is not used for display paging. {Use only if problems are 8 experienced.} /S Turn off the terminal-mode status line. /VVaddr# Use a specific video segment address (Vaddr#, hexidecimal) for display output. For example, VB800 - Default for color card. VB000 - Default for monochrome card. Be very careful of this option; make sure that the address is correct. [Script File List] One can have COMX run one or more script files automatically on startup by including the names of these script files on the command line. For example, COMX modem login A .CEX extension is assumed. [-- $Argument List] $Arguments will replace $Variables in the FIRST script that is also given on the command line. (See script file sections below.) For example, COMX sendfile -- file1 file2 In the above example, assume that there is a script file, `sendfile.cex', which automatically connects you to another computer and executes a command on that computer to start a file upload. In `sendfile.cex' the script file command to begin the upload might be something like: .ru 0 kermit s $1 $2 In this example, `file1' would be substituted for $1, and `file2' would be substituted for $2 in the script command. There is also a special $Argument, -?[prompt] which will result in a prompt for that argument; your input will then replace a $Variable. Spaces can be represented by `^S' in the $Argument and [prompt]. Control characters can be represented as described in Section 10.3, "Control Character Representation". For example, -?File^SName?^S^G There can be multiple -?s. Successive $Variables will be replaced beginning with 9 $1. 7. TERMINAL EMULATION ([M:Alt-T]) 7.1 General Information Most mainframes support some kind of terminal emulation, and COMX provides extensive support for various emulation types. Basically, terminal emulation allows the other computer to recognize what you mean when, for example, you hit the up arrow key. It's really quite a bit more complicated than this, but this brief explanation should suffice for now. After COMX is initialized, the default emulation type is DEC VT100. (This also supports VT102 & VT220 emulations.) If you need to change the type of terminal emulation, you would do so by hitting [M:Alt- T,A]. A great deal of trouble was taken to ensure that the default option settings in the [Alt-T] menu produce the smoothest emulation; however, there may be times when it's necessary to change these settings. (Be forewarned, that some mainframe programs will change some of these settings for you. So, if you are experiencing difficulties after running a program, check the settings.) To change the terminal emulation type hit: [M:Alt-T,A] Just press the letter next to the emulation type desired. You will be returned to the previous menu. Note that the current emulation type under [A] has been updated. Each emulation has a unique abbreviation. This abbreviation is important, since you need to use it in setting a specific terminal emulation type from script files, e.g., `.terminal vt100' {See script file sections below.} As a reference, abbreviations for the various terminal emulation types are as follows: Terminal Abbreviation VT220/VT10x[1] vt100 VT52 vt52 VI300 vi300 ANSI ansi IBM 3101 ibm3101 Televideo 950[1] tele950 Lear ADM 3/5 adm5 ADDS Viewpoint adds Frequently, the other computer needs to be informed of the type of terminal emulation you are using. On a UNIX computer you might issue the command: setenv TERM vt100 [1]Printer control commands are supported. If your printer is not ready to print, COMX will abort the command after beeping several times. 10 7.2 Function Keys The arrow keys produce the correct responses under the different emulations. In addition moves the cursor to the `home' position on the screen and will erase the characters from the current cursor position to the end of the line. The following keys are specifically mapped for VT220/VT102/VT100/VT52 emulations: VT100-220 COMX Key Board Key PF1 Shift-F1 PF2 Shift-F2 PF3 Shift-F3 PF4 Shift-F4 Keypad: 1 Alt-1 2 Alt-2 3 Alt-3 4 Alt-4 5 Alt-5 6 Alt-6 7 Alt-7 8 Alt-8 9 Alt-9 0 Alt-0 - Alt-F1 , Alt-F2 . Alt-F3 Alt-F4 Alt-B Except for , these keys have no meaning to the other terminal emulation types. Two script files are provided to enable mapping of the extended function keys of VT220 and Televideo 950 emulations. These files are `VT220KEY.CEX' and `TELEKEY.CEX', respectively. You will need to load these mappings into your key- macro buffer, so that they can be used. To do this for, e.g., VT220 emulation: 1) From the terminal-mode or main menu, hit [F4] {Respond with: vt220key.} 2) To use a key in terminal-mode, e.g. [F5]: [F1,F5] or e.g. [F20]: [F1,1,F10] {See section on key-macros.} 7.3 Specific Information on Options in [M:Alt-T] [M:Alt-T,A] Terminal Emulation Type: Covered above. (Default = vt100) 11 [M:Alt-T,B] Tab Size: The width of tab-stops can be set to 2-20 columns. (Default = 8) [M:Alt-T,C] Wrap Line: Incoming characters which go beyond 80 columns are `wrapped' to the next line. (Some mainframe programs will turn this off for you.) (Default = YES) [M:Alt-T,D] Translate Incoming LF .... Normally an incoming line of text ends with a CR/LF. However, under certain situations this may not be the case, and you may need to use this option. One case in which this needs to be used is when you have two computers connected with a null modem and both are running COMX. (Default = NO) [M:Alt-T,E] Graphics Character Display: Normally, the 8th-bit (graphics bit) of an incoming character is stripped off before the character is displayed. If you are connected to a computer which is capable of sending graphics characters, you should turn on this option. (Default = NO) [M:Alt-T,F] Destructive Backspace: Normally, an incoming backspace character (ascii 8) simply moves the cursor to the left. This option will also blank out the character onto which the cursor has moved. (Default = NO) [M:Alt-T,G] Xon/Xoff Flow Control: COMX will provide Ctrl-S/Q flow control with its terminal emulation. Using this may cause problems if you are also using a modem; garbage characters which are received by COMX after you disconnect from another computer may inactivate serial I/O. I would recommend that you use this option only if you appear to be losing characters from the other computer. This may occur if you are communicating at baud rates greater than 4800. (Default = NO) [M:Alt-T,H] Enable 132 Column Display: COMX is capable of displaying 132 columns (x 25 rows), but only if you are using a VGA card which can provide 132 column display. If you choose to enable this option, you will be asked for a string consisting of two values separated by a space (e.g., 55 1). The first value corresponds to the INT 10H extended video mode value (hexidecimal) which your VGA card uses for 132 columns. The second value (1=Yes,0=No) indicates that COMX should either use (1) or not use (0) its own 8x16 character font for 132 columns. For a Paradise VGA Plus 16 card, the correct string is: 55 1 12 To determine the video mode value to use with your particular card, do the following: 1) From DOS, execute the program or command which causes your monitor to go into 132x25 display mode. (See the instruction manual which came with your VGA card.) 2) Type: COMX /E The video mode value which you should use is indicated on the second line (`Video Mode ...'). The value (first of two) should be greater than 7. If you enable 132 column display, then you can either invoke COMX in this mode (as long as your monitor is already in this mode as described in 1) above), or COMX will be capable of switching to this mode if the appropriate terminal emulation-reset command is received from another computer. (Default = NO) Note: Your VGA card may require the use of an extended DOS INT 10H function to switch to 132x25 display mode. Since switching is normally done through function, 0x0fH, you may have to use the program, CXDRIVER, to create a video driver which would enable you to use this option. Please refer to the documentation below on how to create such a driver. [M:Alt-T,I] Duplex: In full duplex mode, COMX assumes that the characters which you type in terminal-mode will be echoed back to your computer by the other machine. In half duplex mode, COMX itself will echo these characters. (Default = FULL) [M:Alt-T,J] Break Signal Duration: This is the length of time (multiple of 55 ms) in which a break signal is sent when [Alt-B] is hit. The default is 5 for VT100 emulation. 8. DIALING INTO ANOTHER COMPUTER 8.1 Dialing From Terminal-Mode Before you begin, you should know what serial port settings are used by the other computer and make the necessary changes in COMX using [M:Alt-U], so that the settings at both ends are comparable. Now, from the terminal-mode you can send a command to the modem to have it dial the other computer's phone number. This may be a command like: ATD2334188 {See your modem manual if this doesn't work.} 13 If this is the correct phone number, and your serial port settings agree, you're in luck. 8.2 Dialing From the Autodial Directory ([M:Alt-D]) 8.2.1 Adding an Entry ([M:Alt-D,A]) You can store phone numbers and other information in a directory so that you can quickly connect to another computer at the press of a key. This information is saved in the file, `comx.adr', in your root directory. The first time you enter this directory, there will be no information in it. You must first add an entry to use it. To do so, hit [A]. You will be asked a series of questions: 1) Script? If you wish COMX to automatically invoke a script for that particular entry (e.g., to log you in), you should enter the script name here. Do not include the .CEX extension. All punctuation characters (*,;.?) and blanks will be stripped from the script name. If your script has a `.di' or `.gb' command in it, the command will be ignored. (See script sections below.) You can use a dummy script name if you like or have no script name. 2) Description? This is a brief description of your entry. Punctuation is allowed. You can leave it blank if you wish. 3) Phone Number? There has to be something in this field. It can be an actual phone number (e.g., 0001111). You can prefix this number with a Hayes command (e.g., ATP 000 1111) (`ATD' is the default), and you can imbed modem control characters in it (e.g. 1,,800 0001111). The entry does not have to be a phone number (e.g. ~call 8200). For the latter case, a `~' was placed before the command to circumvent a dialup attempt. The `~' is ignored. 4) Serial Port Settings? Your entry can have a unique serial port setting associated with it. The current settings are the defaults. Changes to these settings are made by using the left or right arrow key to move to a specific field and any other key to move through successive values in each field. Hit to finalize your settings. 5) Save? `y' or `n' If you add more than 10 entries, the additional entries can be viewed using [+] or [-] to page you forward or backward through them. 8.2.2 Changing/Modifying an Entry ([M:Alt-D,C]) Now that you have entered something, you should see it in the directory listing. Let's suppose you want to change the values 14 associated with a particular entry. Press [C,m] -> Entry Number? Give the Entry Number you wish to modify. The subsequent questions are similar to those asked when adding an entry, except that this time, if you do not wish to change a value, just hit . Otherwise, enter something to replace existing information, or a `*' to blank the value. You can delete or undelete an entry under option [C]. If you delete an entry ([C,d]), you will see a `*' next to the entry. This only marks an entry for deletion. The deletion doesn't become effective until you exit the directory ([X]). Escaping () from the directory will abort any changes that you have made to it. 8.2.3 Dialing an Entry ([M:Alt-D,D] or Entry#) This can be done in either of two ways: 1) Press [D] and give the entry number. 2) Just hit the entry number (e.g. 5). If you are on another directory page (e.g., one which contains entries: 11-20), you need only hit, e.g., [0] to dial Entry# 20. Once you dial the number, COMX will wait up to 30 seconds for a carrier signal from the other computer. If you want to abort the operation, press . 8.2.4 Sorting Entries ([M:Alt-D,S]) Directory entries can be sorted in ascending or decending order for easier reference. 8.2.5 Technical Notes After dialing a number COMX can adjust to a lower baud rate which the other computer might be using. (This is done in an identical fashion to that described below for the .gb script command.) COMX makes this adjustment by looking for an extended modem command, typically "CONNECT" (e.g., CONNECT 1200), which is issued by the modem following the connection. On COMX installation, the modem (if one is active) is told to use the extended modem command set. In addition, the entry in [M:F2,H] is set to "CONNECT". If, for some reason, the command is different, change the entry in [M:F2,H], or if your modem cannot use these extended commands, delete this entry. (This is Important.) 9. SENDING AND RECEIVING FILES ([M:PgUp] and [M:PgDn]) 9.1 General Information To send or receive a file(s) to or from another computer, you must first connect to that computer. I've described above how this can be accomplished. Next, from the terminal-mode you will have to issue a command on the remote computer to start the transfer at that end. COMX supports several file transfer protocols including: 15 Protocol Description Kermit Batch, with 8-bit and repeat-character prefixing, 1-3 byte error detection, `k'[2]. Xmodem 128 Byte blocks, checksum error detection, `x'. Xmodem [CRC] 128 Byte blocks, CRC error detection, `xc'. Ymodem 1K Byte blocks, checksum, `y'. Ymodem [CRC] 1K Byte blocks, CRC, `yc'. Ymodem [BATCH] Batch, 1K byte blocks, CRC, `ya'. Ymodem-G Batch, 1K byte blocks, CRC, `yg'. Modem7 Batch, 128 byte blocks, checksum, `m7'. Ascii No error detection, `a'. `Batch' means that multiple files may be sent or received in one session. The X/Ymodem protocols conform to the details published in, "Xmodem/Ymodem Protocol Reference. A Compendium of Documents Describing the Xmodem and Ymodem File Transfer Protocols" (Chuck Forsberg, ed., 1987). Now that you know what's available, you can issue a command on the other computer to start a program compatible with one of the above protocols. Read on first, though. 9.2 Sending a File to Another Computer ([M:PgUp], `Uploading') 9.2.1 Basics After you have started a file transfer program on the other computer, specifically to DOWNLOAD a file, press [PgUp]. You will be presented with a number of protocol choices as described above. Select the desired protocol. You will next be asked for the name of the file (`file(S)' for batch protocols) which you wish to send. If you are sending more than one file, you can enter file names separated by spaces, commas or semicolons, and you can use DOS metacharacters (e.g. filex,d:\tmp\filey.* ). If you have forgotten the file name(s), just enter a directory name and the files in that directory will be listed. If the directory name is capitalized, you will get a long listing of entries; otherwise, a short listing will be displayed. After the directory listing is displayed, you will again be asked for the file name(s). If all goes well, the file(s) will begin transferring and you should see the progress of this transfer displayed on your screen. 9.2.2 Aborting the Transfer If you press at some point, the COMX end of the transfer will be aborted (after some delay), and you MAY see a message like: [2]This is the abbreviation you will use to designate the protocol in a script file. (See script file sections.) 16 `Remote Transfer Abort: ....' Don't panic. This simply means that you have the option of aborting the transfer program which is running on the other computer. Respond according to the protocol you are using. Incidentally, this request is also available from terminal-mode ([M:Alt-A]). 9.2.3 Technical Notes COMX analyzes a file before it is sent to determine whether it is a text or binary file. (Certain protocols require this distinction.) The algorithm which COMX uses, looks at the first 1000 characters for ascii values greater than 127 or 0 (null). If such characters are present or if it finds LF's which are not preceded by CR's, then it assumes that the file is binary (image, graphics). If you are experiencing problems related to the file type, you can force COMX to ask you for the type, and use this type, each time you send a file. You would do so by pressing [M:F2,O,H]. Don't forget to save this option change ([M:F3]). Binary files are typically *.exe, *.com and *.arc files and those produced by various graphics packages. They also may be produced by word processors. For text files, COMX interprets Ctrl-Z as the end of file (EOF) mark. If, for some reason, your text file contains additional Ctrl-Z's (i.e. ones which occur before the end of the file), then you can force COMX to not interpret them as EOF's by using the [M:F2,O,H] option. (When sending the file, specify that the file is a text file.) Graphics characters in text files can be handled in the same way, if you want the file sent as a text file. X/Ymodem protocols may not work properly over 7-bit networks. However, one of the options ([M:F2,O,J]) may allow this operation provided that the other program also recognizes the change in protocol. You can specify an underlying Xon/Xoff (Ctrl-Q/S) protocol with your transfer ([M:F2,O,I]). This works on uploads only. To be effective, the other side must also recognize this option. This helps when a mainframe is busy and you are experiencing buffer overruns. You can specify the default directory from which files will be sent ([M:F2,E]). This can be overridden by including the directory with the file name. For text files, COMX can specify the end-of-line (EOL) designation in a variety of formats to ensure compatibility with a format on another computer ([M:F2,O,B-D]). The default settings should be acceptable to most mainframe computers. For X/Ymodem protocols, a Ctrl-Z is appended to the end of a text file, and the remainder of the block is padded with nulls (ascii 0). There is a nonstandard Kermit option provided with COMX ([M:F2,O,P]) which will allow the transmission of 512 byte packets (uploads or downloads). Contact the author of COMX for further details. Occasionally, you may see a period (`.') displayed on the screen instead of a byte number. This means that a timeout has 17 occurred during the transmission. The length of timeouts and the maximum number of packet retries can be changed: [M:F2,O,E-G]. Default values should be optimal however. Various parameter values for Kermit can be changed in [M:F2,O], however, I would not advise doing so. The way ascii uploads are handled can be specified using the .as script file command. (See script file sections below.) You can also change this specification using `TOOLS.CEX'. 9.3 Receiving a File from Another Computer ([M:PgDn], `Downloading') 9.3.1 Basics Now that you've gotten all of that under your belt, let's try receiving a file. The process is the same, although this time you will first start a file UPLOAD on the other computer, followed by pressing [PgDn]. Select the protocol and answer the questions as described above. If you are using a batch protocol, you will not be asked for a file name; this(ese) is sent along with the file. In the latter case, if the file name is unacceptable to DOS, you will be prompted for a new file name. If the file already exists, a new name will be created with a `$' replacing the last character in the name. In contrast to uploads, you will be asked whether the file is text or binary. All files for a given session should be of the same type; in a batch transfer, you will not be asked this question for each file. Normally, if the download is aborted, the received file to that point is saved. However, you also have the option of having it deleted automatically ([M:F2,O,A]). You can also specify the directory in which a received file will be placed ([M:F2,D]). The latter can be overridden by giving the full path file name (nonbatch protocol). 9.3.2 Technical Notes For received text files, COMX will correctly handle, and if necessary translate, several end-of-line formats (CR, CR/LF or LF). For ascii DOWNLOADS, you can start the UPLOAD from the OTHER computer AFTER pressing [PgDn] and selecting `a'. You will be prompted for the command which will start sending the file from the other machine. 10. KEY-MACROS ([M:F1]) 10.1 General Information A key-macro is a line of text sent to the modem and/or other computer after a specific key is pressed in the terminal-mode. Optionally, the text can also be sent to the printer or screen. The text can be a command recognized by the other computer (e.g., `dir wp^m') or anything else. Normally, you would use a word processor to enter these macros into a special COMX file, 18 `COMXKEY.TXT', which should be located in the root directory of your bootup drive. On starting COMX, these macros are automatically loaded into a key-macro buffer. In `comxkey.txt' there should only be one macro per line; blank lines are ignored. There can be up to 30 macros in the file. You can also place specific macros in the buffer by using the script command: .km {See script sections below.} 10.2 Invoking a Key-Macro Once you have created the file, `COMXKEY.TXT', macros can be invoked from the terminal-mode. (An example file is provided with this package.) First, however, let's see what you have in the buffer. Press [M:F1,h]. You will see a listing of key-macros along with their function key assignments. Let's suppose that `ls^M' is assigned to [F1]. To invoke this macro from the listings menu, just press [F1]. If you wanted to invoke this macro from the terminal-mode, you would press [F1] followed by [F1]. The listing menu is divided into 3 pages. (Page: 0 is the first page -see the menu header.) If you have, let's say, 18 macros and macro #16 is `mail^M', you could invoke this macro directly from the terminal-mode by pressing: [M:F1,1,F6] In this case, the second argument, 1, is the page number. Page numbers can also be used with the `h' option, e.g., [M:F1,1,h] or from within the listings menu, e.g., [1,h] You may also move to a different page from within the listings menu and activate the macro, e.g., [M:F1,h,1,F6] {For macro #16} 10.3 Special Key-Macro Characters Special character sequences can be used to control the execution of a macro: Control Character Representation {The case of the following letters is not important. Also, `^J', e.g., means: `^' followed by `J'.} ^J - Linefeed. {A ^J is NOT automatically added.} ^M - Carriage Return. {A ^M is NOT automatically added.} ^[ - Escape. ^I - Tab. ^G - Beep. ^L - Formfeed. ^S - A Space Can be Represented by ^S. ^^ - Control-^ \^ - ^ Itself. {Other representations are also possible, e.g., ^A,^B ....} 19 If you need leading spaces before a command precede them with a `"', e.g., " mail^M Normally, all leading spaces are ignored. (The first `"' on the line is ignored.) Output Control Sequences ^C - A starting ^C means: send the text which follows ^C to the COM port. (This is optional, since this is the default.) ^P - A starting ^P means: send the text which follows ^P to the printer. ^R - A starting ^R means: run the script which follows ^R. $Arguments to the script may also be included. ^T - A starting ^T means: send the text which follows ^T to the terminal. # - The text which follows `#' is a comment and is not sent. {\# = # Itself} 11. SAVING OPTION CHANGES TO COMX ([M:F3]) To save any changes to the options in the various menus, so that they will be effective the next time you start COMX, press [M:F3]. 12. RUNNING A SCRIPT FROM WITHIN COMX ([M:F4]) You can execute a script from the main menu or terminal-mode by pressing [M:F4]. You will be asked for the name of the script. If you just press , the last script (if there was one) will be rerun along with any arguments which you supplied previously. Pressing will abort the operation. Arguments can be supplied after the script name as discussed above for command line $Arguments (See Startup Options; don't include `--'). You should be aware that if no arguments are supplied to the script, then all $Variable values from the previous invocation will be retained. However, if one or more arguments are supplied, e.g., send file1 file2 then, in this case, $1 and $2 in the script, `send.cex', will be replaced with `file1' and `file2', respectively, and all other $Variables will be cleared. (See script sections. Also see the description of the .nc script command which can be used to modify this replacement strategy.) You need not include the .CEX extension in the script name. Spaces can be included in an argument by representing them with ^S. 13. SENDING TERMINAL-MODE CHARACTERS TO THE PRINTER ([M:F5]) Pressing [M:F5] will cause any subsequent incoming terminal characters to be echoed on the printer (# bits determined by [M:Alt-T,E]). This key also turns off echoing. This kind of ON- OFF key action is termed `toggling'. 14. SAVING TERMINAL-MODE CHARACTERS IN A FILE ([M:F6]) 20 Pressing [M:F6] will toggle a save of all subsequent incoming terminal characters to a file. (The default file is `comx.dwn'. The directory can be specified in [M:F2,D].) Characters will be appended to the contents of this file if it already exists. You can change the default file name by hitting [M:F2,G]. The number of character bits is determined by [M:Alt-T,E]. Except for the `Ansi' terminal emulation type, emulation escape sequences will not be saved. 15. DOS ACCESS ([M:F7]) You can access DOS and do anything that you would normally do in DOS. From DOS, Type: exit to return to COMX. 16. ABORTING A FILE TRANSFER PROGRAM ON ANOTHER COMPUTER ([M:Alt-A]) If you have started Kermit, X/Ymodem or Modem7 on another computer and decide that you don't want to continue. You can prematurely abort the program on that computer by hitting [M:Alt- A]. Select the appropriate protocol at the prompt. 17. CHANGING SERIAL (COM) PORTS ([M:Alt-C] or [M:F2,A]) If you have more than one serial port, you can move between successive ports by hitting [M:Alt-C]. Port settings are those which you have chosen for each port using [M:Alt-U]. (Discussed above.) You can move to specific ports by hitting [M:F2,A]. 18. CHANGING PRINTER (LPT) PORTS ([M:F2,B]) If you have more than one parallel port, you can move to a specific port by hitting [M:F2,B]. 19. INVOKING A WORD PROCESSOR OR EDITOR FROM WITHIN COMX ([M:Alt-E]) You can press [M:Alt-E] to invoke your favorite word processor or editor. In order to do so, however, its name and any arguments must be specified in [M:F2,F]. In entering a name in [M:F2,F], you can also include any arguments, along with the special `-?' argument (any number) described for $Arguments above (Startup Options). The original DOS environment (SET=VALUE) is also provided to the program. The program also may be something other than an editor or word processor. 20. HANGING UP THE PHONE ([M:Alt-H]) On occasion, the termination of a session on another computer or a network will leave your modem "on line". In these cases it will be necessary to press [M:Alt-H]. (COMX will automatically hangup the phone if you exit COMX and the modem is still "on line".) By default, COMX causes the DTR line to drop and then rise. In some instances this will not work, and you will need to define a 21 script which, in turn, causes a hangup condition. If this is the case, you should enter the name of the script in [M:F2,J]. For `broadband' networks, the script should be `NETBRK.CEX'; however, a script is also provided, `HANGUP.CEX', which will send appropriate Hayes commands to your modem. (You need not include the .CEX extension with its name.) If a script name is given in [M:F2,J], COMX will automatically use this script when it needs to do a hangup. 21. LOGGING FILE TRANSFERS ([M:Alt-L]) During uploads and downloads, all received characters (packet control characters included) are saved in a file, `COMX.LOG', in the current directory. This is primarily useful for debugging protocols from other computers. 22. TURNING THE MAIN MENU OFF AND ON ([M:Alt-M]) You may be used to hitting certain keys in another program, and find yourself accidentally hitting these keys in COMX. Well, there's a solution. You can toggle the main menu off or on by hitting [M:Alt-M]. This will deactivate all main menu keys BUT: [Alt-C], [Alt-D], [Alt-H], [Alt-M], [Alt-R], [Alt-X], [F1], [F5] and [F10]. 23. PRINTING A FILE DURING ITS DOWNLOAD ([M:Alt-P]) If you are downloading a text file and want to have it printed as well, press [M:Alt-P]. Please note: if your printer is not ready to receive characters, this option will be turned off without notice. Normally characters are sent to the printer as they are received; however, if a print spooler program is defined in [M:F2,I] then the file will be sent to the spooler after the download has completed. The installation default is the DOS spooler, PRINT. This option remains in effect until it is turned off. 24. DISPLAYING A FILE DURING ITS DOWNLOAD ([M:Alt-S]) If you are downloading a text file and want to have it displayed on the screen as well, press [M:Alt-S]. This option remains in effect until it is turned off. 25. REDIALING A PHONE NUMBER ([M:Alt-R]) If you have dialed a number from the autodial directory or from a script, you can redial the number by pressing [M:Alt-R]. A previous script will not be rerun. 26. LISTING THE FILES IN A DIRECTORY ([M:F2,M]) You can get a listing of files in a directory by pressing [M:F2,M]. Just enter the name of the directory at the prompt or for the current directory. If you capitalize the 22 directory name, a detailed description of each entry is displayed, otherwise, you will see an abbreviated listing. 27. VIEWING A TEXT FILE ([M:F2,N]) The contents of a file can be viewed by pressing [M:F2,N]. 28. HOST-MODE ([M:F2,L]) COMX provides a primative host-mode. Upon entering host-mode, COMX will optionally reset your modem, so that it will answer any incoming calls from another computer. Once someone has dialed into your computer and a connection has been established, the person at the other end can then send commands to your computer to perform specific operations on it. These commands are a subset of COMX script file commands. They are listed here for reference, but are described more fully under the sections dealing with script files. Command Listing (A Subset of Script Commands) .do [file] - Download [file(s)] ONTO HOST. .ex - Causes host to exit COMX. .he - Help. .ls [dir] - List directory [dir] entries on host. .ru - Run a program or DOS command on host. .sf - Show (view) a on host. .tc [yes|no] - Toggle capture of terminal characters (from remote site) to a file. .tf - Terminal characters, after `.tc yes', go into . .te - Set terminal emulation on host. .up - Upload FROM HOST. .PW - Enable use of the various commands. Other Available Commands: .as .fi, .gr, .kl, .km, .pe, .xo, .xt, .xz, .yx, .zx {See script file sections for a full description of usage.} All other text typed by the person at the other end is echoed to your screen. Similarly, anything that you type is sent to the other computer. If the person on the other end types: .help then the information present in the file, `COMXHELP.TXT', is sent to the other side. (Your computer will also beep several times.) You can edit this information as you wish. Two script files, `HOSTON.CEX' and `HOSTOFF.CEX', are provided. They are used to correctly set your modem and COMX for host-mode. These files may be edited, if you like, to customize your host-mode operations. Their names may also be changed ([M:F2,K]). You may want to study these files to see exactly what they do. The other end can break the connection by either hanging up 23 the phone or by typing . Your modem will be returned to the autoanswer mode and COMX system parameters will be reset in case they were changed by commands issued from the other side. If you hit , host-mode will be terminated. If you hit while in host-mode, you will exit the host-mode without hanging up the phone. You could do the latter, if you wanted to maintain a connection with the other computer after going back to your main menu. Hitting will change several of your terminal emulation parameters including duplex type ([M:Alt-T,I]) and CR/LF translation ([M:Alt-T,D]). These parameters will be reset to their original state if you return to host-mode. Please note that if you do maintain a connection with the other machine, any characters which are typed by the other side are not echoed back to that side by COMX. The latter occurs only in host-mode. The serial port settings used by the other computer should agree with those you are using; COMX will not adjust to differences in baud rate. The .tc command could be used to save messages in a specific file for someone on the host computer to read at a later time. A default .tf filename is set in `hoston.cex'. 29. USING COMX UNDER DESQview (V. 2.2/2.3) AND WINDOWS 3.0 COMX can be used under DESQview. The appropriate settings for COMX in DESQview's program setup menu are: Program Name - mcomx.bat[3] Memory Size - 130K {See note below.} Writes to Screen - N Virtualize Text/Graphics - Y {Use COMX's /P option if `N'.} Displays Graphic Information - N Can be Swapped Out of Memory - N Requires Floppy Disk - N And in the F1 Submenu: Text Pages - 1 Close on Exit to DOS - Y Allow Close Window - N Uses Math Coprocessor - N You should adjust the clock-ticks in the DESQview setup program to give the background process more time (e.g., 3-fore-, 6- background). I would suggest that you load COMX first before any other program. If you are using a mouse, you should restrict the COM port [3] `MCOMX.BAT' (or whatever you want to call it) is the DOS batch file that DESQview will use to start COMX. It must have in it the following lines: dvansi {DESQview needs its own version of `ansi.sys'} comx 24 to the one on which you will be communicating. To do so, Enter: -o ( e.g. -o1 ) in the parameter field. You can run multiple versions of COMX in different DESQview windows. To do so, you need to set up a different batch file for each window and use COMX's /O option. For example, MCOMX1.BAT - dvansi comx /O1 {Only COM1 will be used.} MCOMX2.BAT - dvansi comx /O2 {Only COM2 will be used.} Under Windows 3.0 you can optimize COMX's performance by creating a .PIF file. Change the following items from their defaults: Optional Parameters: If you are using a mouse, you should restrict the COM port to the one on which you will be communicating. To do so, Enter: -o ( e.g. -o1 ) for this option. Failure to specify this may result in damage to Windows groups. For 386 Enhanced Mode Usage: KB Desired: 130 {See note below.} Display Usage: Windowed Execution: Background Please Note: To be able to 1) access DOS, 2) invoke an editor/word processor, or 3) spool a downloaded file to the printer using a spooler program, you will need to increase the amount of memory which is available to COMX. I would recommend starting with 200 K. 30. CREATING A 132 COLUMN DISPLAY / MULTI-COM PORT DRIVER The utility program, CXDRIVER (Copyright (C) 1990-1991 Samuel A. Sholl) can be used to create a driver, `COMX.DRV', (created in your bootup directory) which is loaded automatically when COMX starts. This program will work on 8086-80486 machines. CXDRIVER should be used on the disk drive on which you have installed COMX. There are two cases in which you will need to create this driver: 1) If your VGA card uses an extended DOS INT 10H function (greater than 0x0f) to get and set the video mode for 132 column display and 2) if you have more than two COM ports (up to 15). Usually, you will need additional hardware to to support more than two COM ports. Multiport boards from Digiboard Inc. are recommended. 25 Summary of Usage CXDRIVER > [/D] [/S] [/T] [/W] Where: /I = containing driver creation instructions. /D = Default INT 10H values should be used - (=n for normal/standard; =7 for Video 7.) /S = Execute silently (no messages). /T = Test only; don't create driver. /W = Ignore warnings and create driver. Normally, the driver is not created if there are warnings or errors. You will need to create a text file () containing instructions for the creation of the driver. These instructions will be interpreted by CXDRIVER and the file, `\comx.drv' will be created if there are no errors or warnings. Instructions which should be placed in this file are described below. DRIVER CREATION INSTRUCTIONS IN : All specified values should be in hexidecimal. See the file, `cxdriver.txt', for an example. FOR 132 COLUMN DISPLAY (OPTIONAL, IGNORED IF /D USED): COM_Port#:key_word=value (Hexidecimal) #:a8250 = I/O address (base) of an 8250 type UART for the port. (COM1=0x3F8, COM2=0x2F8) #:intn = Interrupt number for the port. (COM1=C, COM2=B) #:a8259 = I/O address (base) of the 8259A interrupt controler for the port. (COM1=COM2=0x20) #:irqn = Interrupt request number for the port. (COM1=4, COM2=3) #:break = Duration of the break signal. (Multiple of 55 ms) (Default=2) #:modem = 0 or 1. This determines whether output requires modem status signals to be asserted. (0=NO, 1=YES) (Default=0) #:otime = Value. Determines timeout period for polled output. (Multiple of 55 ms) (Default=0) #:itime = Value. Determines timeout period for polled input. (Multiple of 55 ms) (Default=0) #:shirq = Address. For devices which share a single interrupt request line, this is the address of the status port which must be read to determine which of the UARTs requested input. (Default=0) #:shmask = Bit Mask. Bit mask which will be compared with the value read from the status port on a shared 26 interrupt multi-port board. The value should indicate which port requested the interrupt. (Default=0) FOR MULTI-PORT OPERATION (OPTIONAL): key_word=value (Hexidecimal) or Register For setting up registers for setting a NEW video MODE: s_moder = al, ah, bl, bh, cl, ch, dl or dh {Register containing video MODE value on function entry.} s_al = Initial value in register al. s_ah = Initial value in register ah. s_bl = Initial value in register bl. s_bh = Initial value in register bh. s_cl = Initial value in register cl. s_ch = Initial value in register ch. s_dl = Initial value in register dl. s_dh = Initial value in register dh. For setting up registers for getting the CURRENT video MODE & # COLUMNS: g_moder = al, ah, bl, bh, cl, ch, dl or dh {Register containing video MODE value on function exit.} g_colr = al, ah, bl, bh, cl, ch, dl or dh {Register containing COLUMN# value on function exit.} g_al = Initial value in register al. g_ah = Initial value in register ah. g_bl = Initial value in register bl. g_bh = Initial value in register bh. g_cl = Initial value in register cl. g_ch = Initial value in register ch. g_dl = Initial value in register dl. g_dh = Initial value in register dh. If not set, defaults are either `al' or zero depending on the variable. 31. SCRIPT FILES 31.1 General Information This is one of the most powerful features of COMX. A script file is a text file, which you create using your word processor. (Save as a DOS text file.) The script file contains commands which cause COMX to do something. Script files must have a .CEX extension, although you don't have to specify this extension when 27 they are invoked. Generally, when a script program is running, any characters which you type on the keyboard are passed through to the other side. This is useful, e.g., if you don't want to include a password in your script. There are three ways to invoke a script: 1) from the DOS command line (see Page 9), 2) by hitting [M:F4] (see Page 20), or 3) from your autodial directory (see Page 14). All of these methods have been described above. COMX script files should be located either in the root directory of your bootup drive or in the directory specified in [M:F2,C]. The COMX script language is described by a set of DOT commands, which may be followed by required (<...>) or optional ([...]) argument(s), e.g., .ds hello there^M^J The number of spaces or tabs before the command is not important. Any other line of text is ignored by the script processor. In addition, I usually use `#' as the first character of a line to designate a comment. (This is processed more quickly.) Blank lines are also permissible. Only the first TWO characters after the DOT are important, e.g., `.te vt100' would be the same as `.terminal vt100' The CASE of the characters in the command IS meaningful. e.g., `.abort' is not the same as `.ABORT'. A number of script files have been provided in the COMX distribution package, and they should be studied for examples of command usage. 31.2 $Variables $Variables can be imbedded within script commands. There are several types of $Variables: $1 ... $30 {Script invocation arguments 1-30} $0 {From .gi command input} $n {The number of script invocation arguments} $f {Name of file just up/downloaded including the directory} $F {Name of file just up/downloaded not including the directory} $$ {$ Itself} These variables and how they are used can be best described by the following examples: .ds Script Argument-1: $1, Argument-2: $2^M^J - $1 and $2 are replaced with the first and second 28 arguments, respectively, on the script invocation line. .ds Number of Script Arguments: $n^M^J - $n is replaced with the actual number of arguments on the script invocation line. .ds Input to the .gi Command was: $0^M^J - $0 is replaced with input to a preceding .gi command. .ds The File Just Sent was: $f^M^J - $f is replaced with the name of the last up/downloaded file. .ds The Dollar Sign Itself Can be Displayed, e.g. $$100.0^M^J For more discussion on the nature of these variables and their initialization, see the above information on the invocation of scripts. 31.3 Jump Labels You can jump to specific labels in the script file using a command such as: .op ju 3 These labels consist of a DOT plus two digits, e.g., .01 {Labels can range from .01 to .30} To use these labels in a jump command, you specify only the integer part as the jump argument, e.g., .09 # something here .op ju 9 {Don't include a leading `0'.} Labels are local to a given script and cannot be used to jump between merged scripts. 31.4 Toggling Activity Some script commands simply toggle a COMX environmental parameter between `YES' and `NO'. These commands are usually descibed as, e.g., .command [YES|NO], where `|' means OR. The argument `YES' or `NO' is optional. An example would be: .b7 YES One could also use `ON' or `OFF', or `1' or `0' in place of `YES' or `NO'. (Case is not important.) Omitting the argument would be the same as specifying `YES'. 31.5 Error Return Values from Commands (ERRVAL) Specific commands may return a TRUE or FALSE ERROR condition which can be tested for by using an .opcode command (.op je; .op jn). If a command returns an error value, (ERRVAL) will be indicated after the command or described under the command. 29 31.6 Basic Commands If a command has a menu-equivalent, it is indicated at the end of the description. .:= $$ Assign to the $Variable . .abort Abort the current script. If the current script is a merged script, you will be returned to the previous script. (See .me). (ERRVAL=TRUE) .ABORT Abort all scripts which are currently running. You will be returned to the main menu. .AE [YES|NO] Abort on error. (Default=YES). Normally, COMX will abort a script if an ERRVAL of TRUE is returned from a specific script command. You should set .AE to NO if you wish to do complex branching using `.op je' or `.op jn'. (See below.) This command is local to the script in which it is used. If an unconditional jump command (e.g., `.op ju') follows immediately after a command with an ERRVAL designation, the ERRVAL from that command is ignored regardless of how .AE is set. .as Specify ascii-send (upload) . should be a string with the format: ,,, (e.g. 1,p,128,2 [no spaces]). Where is the delay time between packets/lines (0-5 secs.); designates that either a line (l) or packet (p) is sent at a time, (1-1000 bytes) specifies the size of a packet (if `p' chosen) and is the delay time between characters (0-100 multiple of 55 ms). These parameters can be saved by pressing [M:F3]. There is no way to enter them from a menu. (See `tools.cex'.) .b7 [YES|NO] 7-Bit mask for X/Ymodem file transfers. YES = use only 7-bits, NO = 8-bits (normal way). ([M:F2,O,J]) .cd Carrier detect. If a carrier signal is detected, ERRVAL=FALSE, else ERRVAL=TRUE. .com [n] COM port switch. Move to next serial port available if no [n] is given, else move to the specific [n] COM port. ([M:F2,A) .CO Modem CONNECT string . ([M:F2,H]) .cs Clear current video screen and send cursor to the home position. .cv Clear $Variable, $, where n = 1-30. If n = -1, all $Variables will be cleared. (Example: .cv 5; .cv -1). .db [YES|NO] Destructive backspace in terminal emulation. ([M:Alt-T,F]) .dial Dial the phone number . There should be no spaces in . (Example: .di 1,8001119999). If you do not include a Hayes prefix (e.g. ATP) in , then `ATD' is prepended to . The 30 script processor waits for a carrier detect signal before continuing unless a `~' is the first character of . (The `~' is ignored.) This command is ignored if the script is invoked from the autodial directory. If a connection is made with the other computer, ERRVAL=FALSE, else ERRVAL=TRUE. (See .gb command.) .down [file] Download a [file] using , where = k,x,xc,y,yc,m7,yg,ya or a; = text or binary file (you can use `i' for image instead of `b'); [file] = name of received file if this is a nonbatch protocol. (See .up) (ERRVAL) ([M:PgDn]) .ds Display string on your terminal. The formatting of follows the same rules as described under Section 10.3, "Control Character Representation". In addition, you may include trailing spaces in by representing them with `^S' and beginning spaces by preceding them with a `"'. (Normally, trailing and beginning spaces are trimmed.) Note: you must specifically include a CR/LF EOL designation in . (Example: .ds " -- ^GHello There^M^J). .du [YES|NO] Duplex - half. YES = half duplex, NO = full duplex. ([M:Alt-T,I]) .editor The of the editor or word processor to invoke after hitting [M:Alt-E]. ([M:F2,F]) .escape Test to determine whether was hit. ERRVAL=TRUE if , else ERRVAL=FALSE. .exit Exit COMX. .file Test for the existence of a given file or directory . (ERRVAL) .flushinput Flush any characters from the current serial port input buffer. .fo [YES|NO] Force binary/text mode query on file uploads. ([M:F2,O,H]) .gb [n] Get the modem's "CONNECT" baud rate and reset COMX to it. (See discussion under Section 8.2.5.) [n] = Number of seconds in which to look for the "CONNECT" baud rate after dialing the number. (Default = 3 secs.) The .gb command MUST be placed BEFORE the .dial command. This command is ignored if the script is invoked from the autodial directory, although if you've defined a "CONNECT" string in [M:F2], switching is done as if .gb were in your script. .gi [prompt] Get input from keyboard following [prompt]. The input can then replace the special $Variable, $0. [Prompt] can be formatted as described under the command, .ds. .gr [YES|NO] Graphics character display capability in terminal emulation. ([M:Alt-T,E]) .hangup Hangup phone. ([M:Alt-H]) .help Help requested from a remote computer while in 31 host-mode. This command can also be used to display the contents of the file, `comxhelp.txt', which should be located in the root directory of your bootup drive. .hostmode Activate host-mode. ([M:F2,O,L]) .ka [YES|NO] Keep aborted-download files. ([M:F2,O,A]) .kl [YES|NO] Kermit - large block. ([M:F2,O,P]) .km Key-macro. Assign to key-macro buffer ([M:F1]) entry . The formatting of is described under the section dealing with key- macros. (Example: `.km 16 mail^J' assigns `mail^J' to [M:F1,1,F6]). .ls [dir] List files in the directory [dir]. If [dir] is capitalized, you will get a detailed description of each file in the directory. (Default = current directory.) ([M:F2,M]) .main [YES|NO] Main menu display. (M:Alt-M) .mi Map terminal input character (ascii value) to character . For example, .mi 13 10 will change all incoming carriage returns (13) into line feeds (10). This will not map characters in file transfers. All characters will be reset to their original ascii values when a terminal is reset using the .term or .restore command. Setting to -1 will also reset all character values. .mo to character . (See the description of.mi which also applies to .mo). This does not affect characters sent using the .tr command or in file transfers. .merge